﻿using PureMVC.Patterns;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// 全局控制类
/// </summary>
public class TestFacade : Facade
{
    public TestFacade(GameObject canvas)
    {
        ////控制层注册("命令消息"与控制层类的对应关系建立绑定)(当发送LevelUp消息时执行TestCommand)
        //Facade实现调用Controller类的RegisterCommand函数，加入command字典，并调用View类的RegisterObserver函数，并加入观察者字典
        RegisterCommand(NotificationConstant.LevelUp, typeof(TestCommand));
        //视图层注册
        //调解器，调用View类的RegisterMediator函数，注册事件
        RegisterMediator(new TestMediator(canvas));
        //模型层注册
        //注册代理
        RegisterProxy(new TestProxy());
    }
}
